﻿using System;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.AI
{
    /// <summary>
    /// AI出生参数
    /// </summary>
    [Serializable]
    public class AIBirthData
    {
        public int uniqueId;
        
        public Vector3 position;
        public Vector3 forward = Vector3.forward;

        public bool randomModel;
        public int modelResId;
        
        public string animState;                // 初始化的动作
        public SideType sideType = SideType.Npc;               // 阵营
        public bool isBoss = false;             // 是否是Boss

        public string graphResPath;             // AI状态机或行为树

        public bool isAutoDelete;               // 是否根据视野策略自动删除
        public bool isStatic;                   // 是否静态角色
        public bool isFare;                     // 是否是乘客

        public bool isStreetEvent;              // 是否是街道事件的Npc
        [Header("掉落包")]
        public int dropItemPackId;
        [Header("重生点")]
        public string rebornPoint;

        public bool isFindNearlyPath;           // 是否从附近位置找到一个路径点
        //public PathDirection pathDirection;     // AI行走的路径方向
        public int pathId;                      // 出生的路径点
        public int pathPointIndex;

        public bool customSpeed;
        public float maxSpeed = 0.2f;

        public bool customPathOffset;
        public float pathOffsetFactor = 0.8f;   // 0~1 ,沿路径行走的偏移因子
        public int lookAtType = 1; //是否lookat(1:不lookat 2:必lookat 3:读字段取概率)
        public bool isPatrol; //是否是巡逻兵
        public int PartrolWayId; //巡逻兵的路径ID;
        public float PatrolSpeed; //巡逻兵的速度
    }

    public enum PathDirection
    {
        Forward = 1,
        Backward = 2,
    }
    
    
}